from ajson import aj


class Test:
    class B:
        def __init__(self):
            import datetime
            self.a = datetime.datetime.now()

    class C:
        def __init__(self):
            self.a = Test.B()

    class D:
        def __init__(self):
            pass

    def __init__(self):
        self.a = 1
        self.b = '1'
        self.c = {
            'a': 1,
            'b': 2
        }
        self.d = [1, 2, 3]
        self.e = [
            {
                'a': 1
            },
            {
                'b': '1'
            }
        ]
        self.f = Test.B()
        self.g = Test.C()


if __name__ == '__main__':
    a = Test()
    print(a)
    a = aj.parse(a, True)
    print(a)
    a = aj.load(a)
    print(a)
